import requests
# 1.获取验证码
rep = requests.get(url="http://localhost/index.php?m=Home&c=User&a=verify")
print(rep.status_code)
# 获取唯一标识符
PHPSESSID = rep.cookies.get("PHPSESSID")

# 2.登录
login_data={
    "username":"17722837342",
    "password":"123456",
    "verify_code":"8888"
}
ck = {
    "PHPSESSID":PHPSESSID
}
rep2 = requests.post(url="http://localhost/index.php/Home/User/index.html",data=login_data,cookies=ck)
# print(rep2.json())
# 3.查看订单
rep3 = requests.get(url="http://localhost/index.php/Home/Order/order_list.html",cookies=ck)
print(rep3.text)